package cn.b.sky.user.freemarker;

import freemarker.cache.TemplateLoader;
import org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer;

import java.util.List;

/**
 * 
 * <strong>Title : SimpleFreeMarkerConfigurer.java<br></strong>
 * <strong>Package : cn.b.sky.user.freemarker<br></strong>
 * <strong>Description : </strong>重写FreeMarkerConfigurer
 * 的getAggregateTemplateLoader方法，应用html转义，还可以通过<br> 
 * <strong>Create on : 2016-3-23 下午4:13:27<br></strong>
 * <p>
 * @author lidapeng<br>
 * @version <strong>v1.0.0</strong><br>
 * <br>
 * <strong>修改历史:</strong><br>
 * 修改人 | 修改日期 | 修改描述<br>
 * -------------------------------------------<br>
 * <br>
 * <br>
 */
public class SimpleFreeMarkerConfigurer extends FreeMarkerConfigurer {

  @Override
  protected TemplateLoader getAggregateTemplateLoader(List<TemplateLoader> templateLoaders) {

    return new HtmlTemplateLoader(super.getAggregateTemplateLoader(templateLoaders));
  }
}
